import {createSlice, PayloadAction} from '@reduxjs/toolkit';

const initialState = {
    ip: '',
    cookies: ''
};
export type rootStateType = Partial<typeof initialState>;
const rootSlice = createSlice({
    name: 'root',
    initialState,
    reducers: {
        setValue(state, actions: PayloadAction<rootStateType>) {
            Object.assign(state, actions.payload);
        }
    }
});

export const {setValue} = rootSlice.actions;
export default rootSlice.reducer;
